package com.my.study.designPatterns.commandPattern;

public class RemoteControlClient {


    public static void main(String[] args) {

        Light light = new Light("Kitchen Light");
        LightOnCommand lightOnCommand = new LightOnCommand(light);
        LightOffCommand lightOffCommand = new LightOffCommand(light);

        Light light1 = new Light("Living room Light");
        LightOnCommand lightOnCommand1 = new LightOnCommand(light1);
        LightOffCommand lightOffCommand1 = new LightOffCommand(light1);

        Setero setero = new Setero();
        StereoOnWithCDCommand stereoOnWithCDCommand = new StereoOnWithCDCommand(setero);
        StereoOffWithCDCommand stereoOffWithCDCommand = new StereoOffWithCDCommand(setero);

        Command [] leftCommands = new Command[3];
        Command [] rightCommands = new Command[3];

        leftCommands[0] = lightOnCommand;
        leftCommands[1] = lightOffCommand1;
        leftCommands[2] = stereoOnWithCDCommand;


        rightCommands[0] = lightOffCommand;
        rightCommands[1] = lightOffCommand1;
        rightCommands[2] = stereoOffWithCDCommand;


        RemoteControl remoteControl = new RemoteControl(leftCommands, rightCommands);

        remoteControl.leftBtnWasPushed(0);
        remoteControl.leftBtnWasPushed(1);
        remoteControl.leftBtnWasPushed(2);

        remoteControl.rightBtnWasPushed(0);
        remoteControl.rightBtnWasPushed(1);
        remoteControl.rightBtnWasPushed(2);

    }
}
